/**
 * Create by CaoWenjian
 *
 * @copyRight: 2018
 **/
package com.bjboot.caocao.system.controller;

import com.bjboot.caocao.system.domain.UserDO;
import com.bjboot.caocao.system.shiro.ShiroUtils;
import org.springframework.stereotype.Controller;

/**
 *@Description 用户信息获取的父类
 *@Author 操文健
 *@Date 2018-09-07 上午11:33
 *@Version 1.0
 **/
@Controller
public class UserBaseController {
    public UserDO getUser() {
        return ShiroUtils.getUser();
    }

    public Long getUserId() {
        return getUser().getUserId();
    }

    public String getUsername() {
        return getUser().getUsername();
    }
}
